package kr.co.doriclassic.pro05_06;

import java.util.Scanner;

class Money{
	private int iOback;
	private int iBack;
	private int iOsip;
	private int iSip;
	private int sumMoney;
	
	public Money(int iOback, int iBack, int iOsip, int iSip) {
		this.iOback = iOback * 500;
		this.iBack = iBack *100;
		this.iOsip = iOsip *50;
		this.iSip = iSip *10;
	}
	
	public void accMoney(){
		sumMoney = iOback + iBack + iOsip + iSip;
		System.out.println("입력한 돈의 액수는 : " + sumMoney+"원입니다.");
	}
}

public class MoneyBox {
	public static void main(String[] args) {
		int iOback;
		int iBack;
		int iOsip;
		int iSip;
		Scanner sc = new Scanner(System.in);
		System.out.print("오백원 갯수:");
		iOback = sc.nextInt();
		System.out.print("백  원 갯수:");
		iBack = sc.nextInt();
		System.out.print("오십원 갯수:");
		iOsip = sc.nextInt();
		System.out.print("십  원 갯수:");
		iSip = sc.nextInt();

		Money m = new Money(iOback, iBack, iOsip, iSip);
		m.accMoney();
	}
}